package com.ytd.smartcanteen.weighting.bean;

import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

import java.io.Serializable;

/**
 * 餐品信息
 *
 * @author gaoguanchao
 * @since 2023/4/19
 */
@Entity
public class MealInfo implements Serializable {

    /**
     * foodId : 1604489420264837120
     * foodName : 京酱肉丝
     * foodLogo : http://8.142.2.251:8391/api/file/preview/yuan_82aea41d7122b63dcacbb6ec2cdad0d3_1676206553107.jpg
     * mealEndTime : 09:00
     * mealStartTime : 07:00
     * mealTimeId : 1601477985679052800
     * mealTimeName : 早餐
     * price : 15.69
     * priceUnit : 元
     * weight : 500
     * weightUnit : g
     * calcType : 0
     * onePortionWeight : 60
     * floatingWeight : 5
     */
    @PrimaryKey
    @NonNull
    public String foodId;
    public String foodName;
    public String foodLogo;
    public String mealEndTime;
    public String mealStartTime;
    public String mealTimeId;
    public String mealTimeName;
    public String mealTimeTypeCode;
    public String price;
    public String priceUnit;
    public int weight;
    public String weightUnit;
    public int calcType;
    public int onePortionWeight;
    public int floatingWeight;
    public int clipWeight;
    public String foodCategoryId;
    public String foodCategoryName;

    public String numberUnit = "1";
    public String numberUnitName = "份";
    public int whetherLimitWeightOfTake = 0;
    public int limitWeightOfTake = 0;
    public int startingWeight = -1;

    public boolean inMeal;
    public boolean bound;
    public String remark;
    /**
     * recipeInfo : {"carbohydrate":3.24,"cholesterol":92.37,"dietaryFiber":0.27,"energy":495.34,"fat":50.04,"na":114
     * .56,"protein":8.05,"recipeId":"1712685931523346432","recipeName":"红烧肉"}
     */

    @Ignore
    public RecipeInfoBean recipeInfo;

    @Override
    public String toString() {
        return "{" +
            "foodId='" + foodId + '\'' +
            ", foodName='" + foodName + '\'' +
            ", clipWeight='" + clipWeight + '\'' +
            ", mealTimeName='" + mealTimeName + '\'' +
            ", mealStartTime='" + mealStartTime + '\'' +
            ", mealEndTime='" + mealEndTime + '\'' +
            ", mealTimeTypeCode='" + mealTimeTypeCode + '\'' +
            ", mealTimeId='" + mealTimeId + '\'' +
            ", inMeal=" + inMeal +
            '}';
    }

    public static class RecipeInfoBean implements Serializable {
        /**
         * carbohydrate : 3.24
         * cholesterol : 92.37
         * dietaryFiber : 0.27
         * energy : 495.34
         * fat : 50.04
         * na : 114.56
         * protein : 8.05
         * recipeId : 1712685931523346432
         * recipeName : 红烧肉
         */

        public double carbohydrate;//	碳水化合物 克
        public double cholesterol;//	胆固醇 毫克
        public double dietaryFiber;//	膳食纤维 克
        public double energy;//	热量 千卡
        public double fat;//	脂肪 克
        public double na;//	钠 毫克
        public double protein;//	蛋白质 克
        public String recipeId;
        public String recipeName;
    }
}
